<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    
<%@include file="/WEB-INF/page/share/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="/shop/css/global/header01.css" rel="stylesheet" type="text/css">
	<link href="/shop/css/product/list.css" rel="stylesheet" type="text/css" />	
	<link href="/shop/css/global/topsell.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>52橙子网首页</title>
</head>
<body>
	<%@include file="/WEB-INF/page/share/Head.jsp" %>
	<div style="float: inherit">
		
		<!-- 一级地区 -->
		<c:forEach items="${requestScope.address}" var="addressItem" varStatus="loop">
			<c:if test="${loop.count == 1}">
				<c:if test="${empty requestScope.message}">
					全北京
				</c:if>
				<c:if test="${!empty requestScope.message}">
					<a href="<html:rewrite action="/index" />">全北京</a>
				</c:if>
			
			</c:if>
			<c:if test="${fn:length(addressItem.childs)>0}">
				<c:if test="${requestScope.selectid != addressItem.addressId}">
					<a href='<html:rewrite action="/index" />?addressid=${addressItem.addressId}&&selectid=${addressItem.addressId}' >${addressItem.name}</a>&nbsp;&nbsp;
				</c:if>
				<c:if test="${requestScope.selectid == addressItem.addressId}">
					${addressItem.name}&nbsp;
				</c:if>
			</c:if>
			<c:if test="${fn:length(addressItem.childs) == 0}">
					${addressItem.name}&nbsp;
			</c:if>
			<c:if test="${loop.count % 20 ==0}"><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</c:if>
		</c:forEach>
		<br />
		<c:if test="${fn:length(requestScope.childAddress)>0}">
			<br/>
			<div style="BORDER-RIGHT: 1px dashed green; BORDER-TOP: 1px dashed green; BACKGROUND: #ffffff; BORDER-LEFT: 1px dashed green; WIDTH: 70%; BORDER-BOTTOM: 1px dashed green; HEIGHT: 70%">
				<!-- 子级查询 -->
				<c:forEach items="${requestScope.childAddress}" var="child" varStatus="loop">
					<c:if test="${loop.count ==1}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</c:if>
					<c:if test="${requestScope.selectchildid == child.addressId}">
						${child.name}&nbsp;
					</c:if>
					<c:if test="${requestScope.selectchildid != child.addressId}">
						<a href='<html:rewrite action="/index" />?addressid=${child.addressId}&&parentId=${child.parent.addressId}&&selectchildid=${child.addressId}' >${child.name}</a>&nbsp;
					</c:if>
					<c:if test="${loop.count % 20 ==0}"><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</c:if>
				</c:forEach>
			</div>
		</c:if>
		<br />
		
		<!-- 商场列表 -->
		<c:forEach items="${requestScope.pageView.records}" var="market" varStatus="loop">
			<a href='<html:rewrite action="/index/market" />?marketid=${market.id}'>
				<img alt="${market.name}" src="/shop${market.image140FullPath }">
			</a>
			<c:if test="${loop.count % 10 ==0}"><br/></c:if>
		</c:forEach>
		<c:if test="${fn:length(requestScope.pageView.records)==0}">
			<center><font color="red">对不起，没有相关数据!</font></center>
		</c:if>
		
		<br/><br/><br/>
		<c:set var="begin" value="<div>" />
		<c:set var="end" value="</div>" />
		<!-- 商品列表开始 -->
		${requestScope.maxcount}
		<c:forEach items="${requestScope.productPageView.records}" var="product" varStatus="loop">
			<c:if test="${loop.count == 1}"><c:out value="${begin}" escapeXml="false" />1</c:if>
			<c:if test ="${loop.count != 1}">
				<c:if test="${loop.count % 4 == 1}"><c:out value="${begin}" escapeXml="false" />2</c:if>
			</c:if>
			<div  style='float:left; width:100; height:100'>
				<a href='/shop/html/product/${product.type.typeid }/${product.id}.html' target="_blank">
					<img alt="${product.name }" src='<c:forEach items="${product.styles}" var="pic" varStatus="loop"><c:if test="${loop.count == 1 }">/shop${pic.image140FullPath}</c:if></c:forEach>'/>
				</a><br/>
				<a href='/shop/html/product/${product.type.typeid }/${product.id}.html' target="_blank">
				${product.name }
				</a><br/>
				${product.parent.name }
				&nbsp;${loop.count}
			</div>
			<c:if test="${loop.count == 4 }">loop.count > 3<c:if test="${loop.count % 4 == 0}"><c:out value="${end}" escapeXml="false" />${loop.count} loop.count % 4 ==0</c:if></c:if>
			<c:if test="${loop.count%4!=0}">
				<c:if test="${loop.count  == requestScope.maxcount}"><c:out value="${end}" escapeXml="false" />${loop.count}${requestScope.maxcount} loop.count  == requestScope.maxcount</c:if>
			</c:if>
		</c:forEach>
		<!-- 商品列表结束 -->
	</div>
</body>
</html>